package com.imooc.security.core.validate.code;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * Created by zghgchao 2018/4/21 15:10
 */
public class ImageCode extends ValidateCode{
    private BufferedImage image;

    /**
     * 在设置时可能设置一个具体的时间，而是设置一个过去的时间间隔，比如说 60秒 过期
     * @param image
     * @param code
     * @param expireIn  过期时间（秒）
     */
    public ImageCode(BufferedImage image, String code, int expireIn) {
        super(code,expireIn);
        this.image = image;
    }


    public ImageCode(BufferedImage image, String code, LocalDateTime expireTime) {
        super(code,expireTime);
        this.image = image;
    }

    public BufferedImage getImage() {
        return image;
    }

    public void setImage(BufferedImage image) {
        this.image = image;
    }

}
